﻿using System;
using System.Threading.Tasks;
using _069.EFCore;

namespace _071.EFCore一对一
{
	public class Program
	{
		static async Task Main(string[] args)
		{
			using MyDbContext ct = new MyDbContext();
			Order oder = new Order();
			oder.Name = "书";

			Delivery d1 = new Delivery();
			d1.CompanyName = "gelly";
			d1.Number = "g001";
			d1.Order = oder;

			ct.Deliverys.Add(d1);

			await ct.SaveChangesAsync();
		}
	}
}
